<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<title>会员服务</title>
	<link rel="stylesheet" href="{yun:}$lietou_style{/yun}/css/css.css?v={yun:}$config.cachecode{/yun}" type="text/css"/>
	<link rel="stylesheet" href="{yun:}$lietou_style{/yun}/css/account.css?v={yun:}$config.cachecode{/yun}" type="text/css"/>
</head> 

<body>
{yun:}include file="$lietoustyle/public.htm"{/yun} 
{yun:}include file="$lietoustyle/header.htm"{/yun}
<div class="m_content">
	<div class="wrap">
		{yun:}include file="$lietoustyle/left.htm"{/yun}
		<div class="m_inner_youb fr">
			<div class="report_uaer_list fl">
            <ul>
			    <li><a href="index.php?c=right" >套餐会员</a></li>
                <li class="report_uaer_list_cur"><a href="index.php?c=right&act=time" >时间会员</a></li> 
			    <li><a href="index.php?c=right&act=added" >增值包</a></li> 
            </ul>
		</div>
		
		<div class="clear"></div>
        
		<div class="package_box">
			<div class="search_con fl">
				<iframe id="fdingdan"  name="fdingdan" onload="returnmessage('fdingdan');" style="display:none"></iframe>
				{yun:}foreach from=$rows key=key item=list{/yun}
					<div class="com_grade_box fl">
						<ul>
							<li>
								<div class="com_grade_rline"></div>
								<div class="com_grade_tit">{yun:}$list.name{/yun}</div>
								
								<div class="com_grade_money">
					
									{yun:}if $config.com_integral_online==3 && $config.member_meal!=1{/yun}	
										<span class="com_grade_money_n" id="need_integral{yun:}$list.id{/yun}">
											{yun:}if $list.time_start < time() && $list.time_end > time(){/yun}
												{yun:}$list.yh_price * $config.integral_proportion{/yun}
											{yun:}else{/yun}
												{yun:}$list.service_price * $config.integral_proportion{/yun}
											{yun:}/if{/yun}
										</span>
										{yun:}if $list.time_start < time() && $list.time_end > time(){/yun}
											<i class="serve_zz_h_nmb_tcjg">{yun:}$list.service_price * $config.integral_proportion{/yun}</i>
										{yun:}/if{/yun}
										{yun:}$config.integral_pricename{/yun}/
										<span>
											{yun:}if $list.service_time>0{/yun}{yun:}$list.service_time{/yun}天{yun:}else{/yun}永久{yun:}/if{/yun}
										</span>
									{yun:}else{/yun}	
										<span class="com_grade_money_n"> ￥</span>
										<span class="com_grade_money_n" id="need_price{yun:}$v.id{/yun}">
											{yun:}if $list.time_start < time() && $list.time_end > time(){/yun}
												{yun:}$list.yh_price{/yun} 
											{yun:}else{/yun}
												{yun:}$list.service_price{/yun}	
											{yun:}/if{/yun}
										</span>
										{yun:}if $list.time_start < time() && $list.time_end > time(){/yun}
											<i class="serve_zz_h_nmb_tcjg">￥{yun:}$list.service_price{/yun}</i>
										{yun:}/if{/yun}/
										<span>
											{yun:}if $list.service_time>0{/yun}{yun:}$list.service_time{/yun}天{yun:}else{/yun}永久{yun:}/if{/yun}
										</span>
									{yun:}/if{/yun}
								</div>
               
								<div class="com_grade_listp">
									服务内容：{yun:}if $list.explains{/yun}{yun:}$list.explains{/yun}{yun:}else{/yun}{yun:}$list.name{/yun}{yun:}/if{/yun} 
								</div>
				
								{yun:}if $config.com_integral_online==3 && $config.member_meal!=1{/yun}
														
									<div class="serve_zz_but">
										<a href="javascript:jfbuy('{yun:}$list.id{/yun}');" class="added_list_gm">立即购买</a>
									</div>
								{yun:}else{/yun}
									<div class="serve_zz_but">      
										<form name="alipayment" target="fdingdan" action="index.php?c=pay&act=dingdan" method="post" id='myform{yun:}$list.id{/yun}' >
											<input type="hidden" value="{yun:}$list.id{/yun}" name="comvip" />
											<a href="javascript:buyvip('{yun:}$list.id{/yun}');" class="added_list_gm">立即购买</a>
										</form>
									</div>
								{yun:}/if{/yun}     
				
								<div class="clear"></div>
				
								<div class="yhtime_box">   
									<span>
									{yun:}if $list.time_start < time() && $list.time_end > time() && $list.coupon{/yun}
										赠送：<font color="#f00">{yun:}$list.coupon{/yun}</font>
									{yun:}/if{/yun}
									</span>
								</div>

								<div class="yhtime_box">   
									{yun:}if $list.time_start < time() && $list.time_end > time(){/yun} 
										<div class="">活动优惠时间：</div>
										{yun:}$list.time_start|date_format:'%Y-%m-%d'{/yun}至{yun:}$list.time_start|date_format:'%Y-%m-%d'{/yun}
									{yun:}/if{/yun}
								</div>
							</li>           
						</ul>
					</div>
				{yun:}/foreach{/yun} 
			</div>
		</div>
    </div>
</div>

<script>
	function buyvip(id){
		$('#myform'+id).submit();
	}

	var ky = '{yun:}$statis.integral{/yun}';

	function jfbuy(id){
		
		var need = $.trim($("#need_integral"+id).html());
	
		if(parseInt(ky)<parseInt(need)){
			
			layer.msg("您的积分不足，请先充值！", 2,8,function(){
				window.location.href="index.php?c=pay";
			});
			
		}else{
			
			$.post('index.php?c=pay&act=dkzf',{id:id,integral:need},function(data){
				
				if(data){
					data=eval('('+data+')'); 
					
					if(data.error==1){
						
						if(data.url){
							layer.msg(data.msg, 2,8,function(){
								window.location.href=data.url;
							});
						}else{
							layer.msg(data.msg, 2,8);
						}
		     			
		     		}else if(data.error==0){
		     			layer.msg(data.msg, 2,9,function(){
							window.location.href='index.php?c=paylogtc';
						}); 
		    		}
				}
				
			})
			
		}
	
	}
</script>
{yun:}include file="$lietoustyle/footer.htm"{/yun} 